package com.system.business.service;

import com.system.business.domain.DailyTrain;
import com.system.business.domain.DailyTrainTicket;
import com.baomidou.mybatisplus.extension.service.IService;
import com.system.business.req.DailyTrainTicketQueryReq;
import com.system.business.req.DailyTrainTicketSaveReq;
import com.system.business.resp.DailyTrainTicketQueryResp;
import com.system.common.resp.PageResp;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;

/**
* @author Admin
* @description 针对表【daily_train_ticket(余票信息)】的数据库操作Service
* @createDate 2024-03-21 15:02:15
*/
public interface DailyTrainTicketService extends IService<DailyTrainTicket> {

    void save(DailyTrainTicketSaveReq req);

    PageResp<DailyTrainTicketQueryResp> queryList(DailyTrainTicketQueryReq req);

    @Transactional
    void genDaily(DailyTrain dailyTrain, Date date, String trainCode);

    DailyTrainTicket selectByUnique(Date date, String trainCode, String start, String end);

    void  reduceTicketNum(Date date, String trainCode, String start, String end, String seatType);
}
